﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;

namespace System.Windows
{
    public static class PointExtensions
    {
        public static bool IsWithinBoundsOf(this Point point, Rect rect)
        {
            //is the x coordiate within the rectangle bound
            if (point.X > rect.Left && point.X < rect.Y)
            {
                //is the y coordinate within the rectangle bounds
                if (point.Y > rect.Top && point.Y < rect.Bottom)
                {
                    return true;
                }
            }
            return false;
        }
    }
}
